package com.blb.zy_community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 区域表
 * </p>
 *
 * @author 二组
 * @since 2023-06-18
 */
@TableName("sys_area")
public class SysArea implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 唯一主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 城市编码
     */
    private Integer code;

    /**
     * 城市名称
     */
    private String name;

    /**
     * 城市父ID
     */
    private Integer parentId;

    /**
     * 城市等级(0:省,1:市,2:县)
     */
    private Integer level;

    /**
     * 功能类型(1:角色认证地点开通;0:未开通)
     */
    private Integer type;

    /**
     * 服务状态
     */
    private Integer servicestate;

    /**
     * 逻辑删除 0正常 1 删除
     */
    private Integer deleteFlag;

    /**
     * 地区范围
     */
    private Integer region;

    /**
     * 子城市
     */
    @TableField(exist = false)
    private List<SysArea> childArea;

    public List<SysArea> getChildArea() {
        return childArea;
    }

    public void setChildArea(List<SysArea> childArea) {
        this.childArea = childArea;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getServicestate() {
        return servicestate;
    }

    public void setServicestate(Integer servicestate) {
        this.servicestate = servicestate;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getRegion() {
        return region;
    }

    public void setRegion(Integer region) {
        this.region = region;
    }

    @Override
    public String toString() {
        return "SysArea{" +
                "id=" + id +
                ", code=" + code +
                ", name='" + name + '\'' +
                ", parentId=" + parentId +
                ", level=" + level +
                ", type=" + type +
                ", servicestate=" + servicestate +
                ", deleteFlag=" + deleteFlag +
                ", region=" + region +
                ", childArea=" + childArea +
                '}';
    }
}
